package com.supermap.dubbo;

import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.fastjson.JSONObject;
import com.supermap.dubbo.service.DataDubboService;
import com.supermap.tool.MysqlEntity;
import com.supermap.tool.SqlCx;
import com.supermap.util.SQLFactory;
import org.springframework.stereotype.Component;

import java.net.URLDecoder;

/**
 * @author xiaolu
 * @date 2018/6/14 下午5:05
 */
@Component
public class DataDubboConcumerService {
    @Reference(version = "1.0.0")
    DataDubboService dataDubboService;

    public JSONObject getDataWithSelect(String selectSql) {
        return dataDubboService.selectData(selectSql);
    }

    public JSONObject getDataWithUpdate(String selectSql) {
        return dataDubboService.updateData(selectSql);
    }

    public JSONObject getDataWithInsert(String selectSql) {
        return dataDubboService.insertData(selectSql);
    }

    public JSONObject getDataWithDelete(String selectSql) {
        return dataDubboService.deleteData(selectSql);
    }
}
